package at.ac.tuwien.mg.service;

import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.JavaDelegate;

import at.ac.tuwien.mg.bean.Offer;

public class AutomaticPurchasing implements JavaDelegate  {

	@Override
	public void execute(DelegateExecution de) throws Exception {
		Offer offer = (Offer) de.getVariable("selectedOffer");
		
		//send order to Supplier
		offer.getSupplier().orderOffer(offer);
	}

}
